package com.listen.controller;

import java.util.Date;
import java.util.TimerTask;

import com.listen.common.DataBase;
import com.listen.common.DateFormatUtil;

public class Task2 extends TimerTask{

	@Override
	public void run() {
		System.out.println("----task2 start--------"+new Date().toLocaleString());  
        try {
        	String sql = "insert into user (name,code,pwd,zy_name,zy_code,type,all_num,now_num,classNum,status,company_name,create_tm) "
        			+ "values ('胡晓健','620402199108061368','888888','二级建造师市政工程必修','2',4,57,31,1,0,'','"+DateFormatUtil.getDateStr()+"')";
        	System.out.println(DataBase.update(sql));
            Thread.sleep(5000);  
        } catch (InterruptedException e) {  
            e.printStackTrace();  
        }  
        System.out.println("----5s later, task2 end--------"+new Date().toLocaleString());
	}

}
